package edu.gatech.app4args.utils;

import edu.gatech.app4args.resources.Globals;

import java.util.ArrayList;

/**
 * Contains all data and attributes for a slide data section.
 * 
 * @author Andrew Lunsford
 */
public class SlideDataSection {
	/** The sections liststyle */
	private int lStyle;
	/** The sections smartart style */
	private int smartArt;
	/** The data contained in the section */
	private ArrayList<String> content;

	/**
	 * Creates a new SlideDataSection with a blank liststyle and smartart.
	 */
	public SlideDataSection(){
		lStyle = Globals.lStyle_none;
		smartArt = 0;
		content = new ArrayList<String>();
	}

	public int getlStyle(){
		return lStyle;
	}

	public void setLStyle(int style){
		lStyle = style;
	}

	public int getSmartArt(){
		return smartArt;
	}

	public void setSmartArt(int saStyle){
		smartArt = saStyle;
	}

	/**
	 * Adds data to the section's content.
	 *
	 * @param str data to add to the content
	 * @return true if data was added successfully
	 */
	public boolean addContent(String str){
		int size = content.size();
		content.add(str);
		return size != content.size();
	}

	public ArrayList<String> getContent(){
		return content;
	}

	/**
	 * Used to print out all the data and attributes for the section.
	 *
	 * @return a string representation of the SlideDataSection
	 */
	@Override
	public String toString(){
		String out = "\tListStyle: "+lStyle+"\n";
		out+= "\tSmartArt:  "+smartArt+"\n";
		out+= "\tContent:   "+content.toString()+"\n";
		return out;
	}

}
